package com.marry.daodaomanage.infrastructure.service;

import com.marry.daodaomanage.infrastructure.service.dto.UserAccessToken;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author mal
 * @date 2022-11-16 17:39
 */
@FeignClient("daodao-auth-server")
public interface OAuthService {


    @PostMapping("/oauth/token")
    UserAccessToken token(@RequestParam("username") String username,
                          @RequestParam("password") String password,
                          @RequestParam("grant_type") String grantType,
                          @RequestParam("scope") String scope,
                          @RequestParam("auth_type") String authType,
                          @RequestHeader("Authorization") String authorization);


    @GetMapping("/home")
    String homeIndex();



}
